-- GENERATED SPELL FOR [Gordunni Head-Splitter] --


function spell0_22148(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22148', 567, 1)
end

function spell1_22148(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_22148', 568, 1)
end

function Sorts_22148(pUnit, Event)
local choix_sorts_22148 = math.random(0, 1)
if choix_sorts_22148 == 0 then
pUnit:RegisterEvent('spell0_22148', 1, 1)
end
if choix_sorts_22148 == 1 then
pUnit:RegisterEvent('spell1_22148', 1, 1)
end
end

function mob22148_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22148', math.random(1500, 3000), 1)
end

function mob22148_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22148_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22148_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22148, 1, 'mob22148_Action')
RegisterUnitEvent(22148, 2, 'mob22148_Leave')
RegisterUnitEvent(22148, 3, 'mob22148_Kill')
RegisterUnitEvent(22148, 4, 'mob22148_Die')
